﻿@page
@model IndexModel
@{
    ViewBag.Title = "类型管理";
    ViewBag.Current = "events.types";
}

<div class="card">
    <div class="card-body">
        <table class="table table-hover" .warning="Model.Types" .warning-text="没有添加日志类型！">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>样式</th>
                    <th class="text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var type in Model.Types)
                {
                    <tr class="data-item">
                        <td>@type.Name</td>
                        <td><gt:event-icon id="@type.Id"></gt:event-icon></td>
                        <td class="text-center">
                            <gt:action link="true" typeof="Edit" asp-route-id="@type.Id" asp-page="./Edit"></gt:action>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>